<template>
    <a-modal v-model:open="visible" title="公告详情" :destroy-on-close="destroyOnClose" width="1200px" :mask-closable="maskClosable" :footer="null" :after-close="afterClose">
        <View ref="viewRef" />
    </a-modal>
</template>
<script setup>
import { ref, nextTick } from 'vue'
import { useModal } from '@iframe/tools/mixins/ModelDrawerMixins'
import View from './View.vue'

const { visible, destroyOnClose, maskClosable } = useModal()
const emits = defineEmits(['close'])
const viewRef = ref()
const afterClose = () => {
    emits('close')
}
const open = row => {
    visible.value = true
    nextTick(() => {
        viewRef.value.load(row)
    })
}

defineExpose({ open })
</script>
